package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WeightConfigMapper;
import com.ruoyi.system.domain.WeightConfig;
import com.ruoyi.system.service.IWeightConfigService;

/**
 * 地磅配置Service业务层处理
 * 
 * @author he
 * @date 2025-09-22
 */
@Service
public class WeightConfigServiceImpl implements IWeightConfigService 
{
    @Autowired
    private WeightConfigMapper weightConfigMapper;

    /**
     * 查询地磅配置
     * 
     * @param id 地磅配置主键
     * @return 地磅配置
     */
    @Override
    public WeightConfig selectWeightConfigById(Long id)
    {
        return weightConfigMapper.selectWeightConfigById(id);
    }

    /**
     * 查询地磅配置列表
     * 
     * @param weightConfig 地磅配置
     * @return 地磅配置
     */
    @Override
    public List<WeightConfig> selectWeightConfigList(WeightConfig weightConfig)
    {
        return weightConfigMapper.selectWeightConfigList(weightConfig);
    }

    /**
     * 新增地磅配置
     * 
     * @param weightConfig 地磅配置
     * @return 结果
     */
    @Override
    public int insertWeightConfig(WeightConfig weightConfig)
    {
        return weightConfigMapper.insertWeightConfig(weightConfig);
    }

    /**
     * 修改地磅配置
     * 
     * @param weightConfig 地磅配置
     * @return 结果
     */
    @Override
    public int updateWeightConfig(WeightConfig weightConfig)
    {
        return weightConfigMapper.updateWeightConfig(weightConfig);
    }

    /**
     * 批量删除地磅配置
     * 
     * @param ids 需要删除的地磅配置主键
     * @return 结果
     */
    @Override
    public int deleteWeightConfigByIds(Long[] ids)
    {
        return weightConfigMapper.deleteWeightConfigByIds(ids);
    }

    /**
     * 删除地磅配置信息
     * 
     * @param id 地磅配置主键
     * @return 结果
     */
    @Override
    public int deleteWeightConfigById(Long id)
    {
        return weightConfigMapper.deleteWeightConfigById(id);
    }
}
